package com.common.myspring.util;

import lombok.extern.slf4j.Slf4j;

/**
 * @title: BaseUtil
 * @Author xu-xiang
 * @Date: 2023/8/26 14:49
 * @description: String工具类
 */
@Slf4j
public class StringUtil {

    /**
     * 首字母转小写
     */
    public static String toLowerFirstLetter(String input) {
        if (input == null || input.isEmpty()) {
            return input;
        }
        char firstChar = input.charAt(0);
        if (Character.isUpperCase(firstChar)) {
            return Character.toLowerCase(firstChar) + input.substring(1);
        }
        return input;
    }

}
